from django.shortcuts import render

# Create your views here.
from rest_framework.status import HTTP_201_CREATED

from .models import *
from rest_framework import viewsets
from .serializers import *
from rest_framework.response import Response

class StudentViewset(viewsets.ModelViewSet):
    # 拿到查询集
    queryset = Student.objects.all()
    # 定义序列化器
    serializer_class = StudentSerializer
class ClassViewset(viewsets.ModelViewSet):
    # 拿到查询集
    queryset = Classes.objects.all()
    # 定义序列化器
    serializer_class = ClassesSerializer



